<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateBasicLinkTable extends Migration
{
    /**
     * 友情链接
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('basic_link', function (Blueprint $table) {
            $table->increments('id');
            $table->tinyInteger('site_id', false, true)->default(0)->comment('站点编号 默认 0:单站点;');
            $table->string('title')->nullable()->comment('名称');
            $table->string('links')->nullable()->comment('链接地址');
            $table->integer('cover_id')->default(0)->comment('logo封面图片');
            $table->string('cover')->nullable()->comment('封面图片地址');
            $table->string('owner')->nullable()->comment('所有者');
            $table->string('description')->nullable()->comment('网站简介');
            $table->smallInteger('sort', false, true)->default(0)->comment('排序');
            $table->tinyInteger('status')->default(99)->comment('99 正常; 0未通过审核');
            $table->char('ip', 15)->nullable()->comment('ip地址');
            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('basic_link');
    }
}
